package com.joven.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.joven.model.ClassRoom;
import com.joven.model.Teacher;
import com.joven.service.ClassRoomService;
import com.joven.service.TeacherService;

@Component("teacherServiceImp")
public class TeacherServiceImp extends BaseServiceImp<Teacher,String> implements TeacherService {

	@Autowired
	private ClassRoomService classRoomService;
	
	public int save(Teacher entity){
		super.save(entity);
		System.out.println(entity.getClassRoom().getRoomId());
		System.out.println(entity.getClassRoom().getRoomName());
		ClassRoom cl=classRoomService.getById(entity.getClassRoom().getRoomId());
		System.out.println(cl.getRoomId());
		Teacher x=this.getById(entity.getTcid());
		System.out.println(x.getTcName());
		System.out.println(cl.getRoomName());
		Integer.parseInt("abc");
		return 0;
	}
}
